using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TVT.UI.EventArguments;

namespace TVT.UI
{
    public partial class Companies : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ListCompany.OnEditCompany += new EventHandler(ListMapping_OnEditAccount);
            CreateUpdateCompany1.OnSavedCompany += new EventHandler(CreateUpdateAccount1_OnSavedAccount);
        }

        private void ListMapping_OnEditAccount(object souce, EventArgs e)
        {
            EntityEventArgs args = (EntityEventArgs)e;
            CreateUpdateCompany1.EditCompany(args.Id);            
        }

        private void CreateUpdateAccount1_OnSavedAccount(object souce, EventArgs e)
        {
            ListCompany.Refresh();
        }

        private void ListAccount1_OnDeletedAccount(object souce, EventArgs e)
        {
            CreateUpdateCompany1.CancelCompany();
        }
    }
}
